home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 5 / CD-ROM Today - The Disc (Issue 5)(November 1994).ISO / mac / Mac shareware / Education / RLaB / misc / configure < prev    next >
Encoding:
Text File  |  1994-09-21  |  75.0 KB  |  2,915 lines  |  [TEXT/ttxt]

  1.  
  2.  
  3. #!/bin/sh
  4. progname="`echo $0`"
  5.  
  6. ## Usage messages.
  7.  
  8. short_usage="Usage: ${progname} [--with-LIBS=dir] ...
  9.  
  10. Set compilation and installation parameters for RLaB.
  11. --with-LIBS=DIR        Add DIR to list of directories to search for
  12.             ALL libraries.
  13. --with-NALIBS=DIR    Search for Numerical Analysis libraries in DIR.
  14. --with-FLIBS=DIR    Search for Fortran libraries in DIR.
  15. --with-PLIBS=DIR    Search for PLPLOT Library in DIR
  16. --with-gcc        Force usage of the GNU C compiler.
  17. --with-cc        Force usage of cc(1)
  18. --prefix=DIR        Set the Makefile variable \'prefix\' to DIR.
  19.             RLaB will be installed with DIR as the root
  20.             directory.
  21.  
  22. If successful, ${progname} leaves its status in config.status.  If
  23. unsuccessful after disturbing the status quo, it removes config.status."
  24.  
  25.  
  26. #!/bin/sh
  27. # Guess values for system-dependent variables and create Makefiles.
  28. # Generated automatically using autoconf version 1.11 
  29. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  30.  
  31. # This configure script is free software; you can redistribute it and/or
  32. # modify it under the terms of the GNU General Public License as published
  33. # by the Free Software Foundation; either version 2, or (at your option)
  34. # any later version.
  35.  
  36. # This script is distributed in the hope that it will be useful, but
  37. # WITHOUT ANY WARRANTY; without even the implied warranty of
  38. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  39. # Public License for more details.
  40.  
  41. # You should have received a copy of the GNU General Public License
  42. # along with this program; if not, write to the Free Software
  43. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  44.  
  45. # Save the original args to write them into config.status later.
  46. configure_args="$*"
  47.  
  48. # Only options that might do something get documented.
  49. ac_usage="Usage: configure [options] [host]
  50. Options: [defaults in brackets after descriptions]
  51. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  52. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  53. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  54. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  55. --help            print this message
  56. --host=HOST        configure for HOST [guessed]
  57. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  58. --quiet, --silent    do not print \`checking for...' messages
  59. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  60. --target=TARGET        configure for TARGET [TARGET=HOST]
  61. --verbose        print results of checks
  62. --version        print the version of autoconf that created configure
  63. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  64. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  65. --x-includes=DIR    X include files are in DIR
  66. --x-libraries=DIR    X library files are in DIR"
  67.  
  68. # Initialize some variables set by options.
  69. # The variables have the same names as the options, with
  70. # dashes changed to underlines.
  71. build=NONE
  72. exec_prefix=
  73. host=NONE
  74. no_create=
  75. nonopt=NONE
  76. norecursion=
  77. prefix=
  78. program_prefix=
  79. program_suffix=
  80. program_transform_name=
  81. silent=
  82. srcdir=
  83. target=NONE
  84. verbose=
  85. x_includes=
  86. x_libraries=
  87.  
  88. ac_prev=
  89. for ac_option
  90. do
  91.  
  92.   # If the previous option needs an argument, assign it.
  93.   if test -n "$ac_prev"; then
  94.     eval "$ac_prev=\$ac_option"
  95.     ac_prev=
  96.     continue
  97.   fi
  98.  
  99.   # Accept (but ignore some of) the important Cygnus configure
  100.   # options, so we can diagnose typos.
  101.  
  102.   case "$ac_option" in
  103.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  104.   *) ac_optarg= ;;
  105.   esac
  106.  
  107.   case "$ac_option" in
  108.  
  109.   -build | --build | --buil | --bui | --bu | --b)
  110.     ac_prev=build ;;
  111.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  112.     build="$ac_optarg" ;;
  113.  
  114.   -disable-* | --disable-*)
  115.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  116.     # Reject names that aren't valid shell variable names.
  117.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  118.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  119.     fi
  120.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  121.     eval "enable_${ac_feature}=no" ;;
  122.  
  123.   -enable-* | --enable-*)
  124.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  125.     # Reject names that aren't valid shell variable names.
  126.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  127.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  128.     fi
  129.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  130.     case "$ac_option" in
  131.       *=*) ;;
  132.       *) ac_optarg=yes ;;
  133.     esac
  134.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  135.  
  136.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  137.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  138.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  139.   | --exec | --exe | --ex)
  140.     ac_prev=exec_prefix ;;
  141.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  142.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  143.   | --exec=* | --exe=* | --ex=*)
  144.     exec_prefix="$ac_optarg" ;;
  145.  
  146.   -gas | --gas | --ga | --g)
  147.     with_gas=yes ;; # Obsolete; use --with-gas.
  148.  
  149.   -help | --help | --hel | --he)
  150.     cat << EOF
  151. $ac_usage
  152. EOF
  153.     exit 0 ;;
  154.  
  155.   -host | --host | --hos | --ho)
  156.     ac_prev=host ;;
  157.   -host=* | --host=* | --hos=* | --ho=*)
  158.     host="$ac_optarg" ;;
  159.  
  160.   -nfp | --nfp | --nf)
  161.     with_fp=no ;; # Obsolete; use --without-fp.
  162.  
  163.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  164.   | --no-cr | --no-c)
  165.     no_create=yes ;;
  166.  
  167.   -norecursion | --norecursion | --norecursio | --norecursi \
  168.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  169.     norecursion=yes ;;
  170.  
  171.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  172.     ac_prev=prefix ;;
  173.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  174.     prefix="$ac_optarg" ;;
  175.  
  176.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  177.   | --program-pre | --program-pr | --program-p)
  178.     ac_prev=program_prefix ;;
  179.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  180.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  181.     program_prefix="$ac_optarg" ;;
  182.  
  183.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  184.   | --program-suf | --program-su | --program-s)
  185.     ac_prev=program_suffix ;;
  186.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  187.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  188.     program_suffix="$ac_optarg" ;;
  189.  
  190.   -program-transform-name | --program-transform-name \
  191.   | --program-transform-nam | --program-transform-na \
  192.   | --program-transform-n | --program-transform- \
  193.   | --program-transform | --program-transfor \
  194.   | --program-transfo | --program-transf \
  195.   | --program-trans | --program-tran \
  196.   | --progr-tra | --program-tr | --program-t)
  197.     ac_prev=program_transform_name ;;
  198.   -program-transform-name=* | --program-transform-name=* \
  199.   | --program-transform-nam=* | --program-transform-na=* \
  200.   | --program-transform-n=* | --program-transform-=* \
  201.   | --program-transform=* | --program-transfor=* \
  202.   | --program-transfo=* | --program-transf=* \
  203.   | --program-trans=* | --program-tran=* \
  204.   | --progr-tra=* | --program-tr=* | --program-t=*)
  205.     program_transform_name="$ac_optarg" ;;
  206.  
  207.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  208.   | -silent | --silent | --silen | --sile | --sil)
  209.     silent=yes ;;
  210.  
  211.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  212.     ac_prev=srcdir ;;
  213.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  214.     srcdir="$ac_optarg" ;;
  215.  
  216.   -target | --target | --targe | --targ | --tar | --ta | --t)
  217.     ac_prev=target ;;
  218.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  219.     target="$ac_optarg" ;;
  220.  
  221.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  222.     verbose=yes ;;
  223.  
  224.   -version | --version | --versio | --versi | --vers)
  225.     echo "configure generated by autoconf version 1.11"
  226.     exit 0 ;;
  227.  
  228.   -with-* | --with-*)
  229.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  230.     # Reject names that aren't valid shell variable names.
  231.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  232.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  233.     fi
  234.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  235.     case "$ac_option" in
  236.       *=*) ;;
  237.       *) ac_optarg=yes ;;
  238.     esac
  239.     eval "with_${ac_package}='$ac_optarg'" ;;
  240.  
  241.   -without-* | --without-*)
  242.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  243.     # Reject names that aren't valid shell variable names.
  244.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  245.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  246.     fi
  247.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  248.     eval "with_${ac_package}=no" ;;
  249.  
  250.   --x) with_x=yes ;; # Obsolete; use --with-x.
  251.  
  252.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  253.   | --x-incl | --x-inc | --x-in | --x-i)
  254.     ac_prev=x_includes ;;
  255.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  256.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  257.     x_includes="$ac_optarg" ;;
  258.  
  259.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  260.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  261.     ac_prev=x_libraries ;;
  262.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  263.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  264.     x_libraries="$ac_optarg" ;;
  265.  
  266.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  267.     ;;
  268.  
  269.   *) 
  270.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  271.       echo "configure: warning: $ac_option: invalid host type" >&2
  272.     fi
  273.     if test "x$nonopt" != xNONE; then
  274.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  275.     fi
  276.     nonopt="$ac_option"
  277.     ;;
  278.  
  279.   esac
  280. done
  281.  
  282. if test -n "$ac_prev"; then
  283.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  284. fi
  285.  
  286. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  287. trap 'rm -fr confdefs* $ac_clean_files' 0
  288.  
  289. # Save the original args if we used an alternate arg parser.
  290. ac_configure_temp="${configure_args-$*}"
  291. # Strip out --no-create and --norecursion so they don't pile up.
  292. configure_args=
  293. for ac_arg in $ac_configure_temp; do
  294.   case "$ac_arg" in
  295.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  296.   | --no-cr | --no-c) ;;
  297.   -norecursion | --norecursion | --norecursio | --norecursi \
  298.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  299.   *) configure_args="$configure_args $ac_arg" ;;
  300.   esac
  301. done
  302.  
  303. # NLS nuisances.
  304. # These must not be set unconditionally because not all systems understand
  305. # e.g. LANG=C (notably SCO).
  306. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  307. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  308.  
  309. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  310. rm -rf conftest* confdefs.h
  311. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  312. echo > confdefs.h
  313.  
  314. # A filename unique to this package, relative to the directory that
  315. # configure is in, which we can look for to find out if srcdir is correct.
  316. ac_unique_file=rlab.h
  317.  
  318. # Find the source files, if location was not specified.
  319. if test -z "$srcdir"; then
  320.   ac_srcdir_defaulted=yes
  321.   # Try the directory containing this script, then `..'.
  322.   ac_prog=$0
  323.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  324.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  325.   srcdir=$ac_confdir
  326.   if test ! -r $srcdir/$ac_unique_file; then
  327.     srcdir=..
  328.   fi
  329. fi
  330. if test ! -r $srcdir/$ac_unique_file; then
  331.   if test x$ac_srcdir_defaulted = xyes; then
  332.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  333.   else
  334.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  335.   fi
  336. fi
  337. ac_ext=c
  338. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  339. ac_cpp='${CPP}'
  340. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  341.  
  342.  
  343.  
  344.  
  345. # check whether --with-LIBS or --without-LIBS was given.
  346. withval="$with_LIBS"
  347. if test -n "$withval"; then
  348.   
  349.   LIBS="-L$withval "
  350.   LLIBS="-L$withval "
  351.  
  352. else
  353.   
  354.   LIBS="-L/usr/local/lib "
  355.   LLIBS="-L/usr/local/lib "
  356.  
  357. fi
  358.  
  359.  
  360. for ac_prog in 'bison -y' byacc
  361. do
  362. if test -z "$YACC"; then
  363.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  364.   set ac_dummy $ac_prog; ac_word=$2
  365.   test -n "$silent" || echo "checking for $ac_word"
  366.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  367.   for ac_dir in $PATH; do
  368.     test -z "$ac_dir" && ac_dir=.
  369.     if test -f $ac_dir/$ac_word; then
  370.       YACC="$ac_prog"
  371.       break
  372.     fi
  373.   done
  374.   IFS="$ac_save_ifs"
  375. fi
  376.  
  377. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  378.  
  379. test -n "$YACC" && break
  380. done
  381. test -n "$YACC" || YACC="yacc"
  382.  
  383.  
  384. if test -z "$FLEX"; then
  385.   # Extract the first word of `flex', so it can be a program name with args.
  386.   set ac_dummy flex; ac_word=$2
  387.   test -n "$silent" || echo "checking for $ac_word"
  388.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  389.   for ac_dir in $PATH; do
  390.     test -z "$ac_dir" && ac_dir=.
  391.     if test -f $ac_dir/$ac_word; then
  392.       FLEX="flex"
  393.       break
  394.     fi
  395.   done
  396.   IFS="$ac_save_ifs"
  397. fi
  398.  
  399. test -n "$FLEX" && test -n "$verbose" && echo "    setting FLEX to $FLEX"
  400.  
  401.  
  402. for ac_prog in mawk gawk nawk awk
  403. do
  404. if test -z "$AWK"; then
  405.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  406.   set ac_dummy $ac_prog; ac_word=$2
  407.   test -n "$silent" || echo "checking for $ac_word"
  408.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  409.   for ac_dir in $PATH; do
  410.     test -z "$ac_dir" && ac_dir=.
  411.     if test -f $ac_dir/$ac_word; then
  412.       AWK="$ac_prog"
  413.       break
  414.     fi
  415.   done
  416.   IFS="$ac_save_ifs"
  417. fi
  418.  
  419. test -n "$AWK" && test -n "$verbose" && echo "    setting AWK to $AWK"
  420.  
  421. test -n "$AWK" && break
  422. done
  423.  
  424. # Make sure to not get the incompatible SysV /etc/install and
  425. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  426. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  427. # or the AFS install, which mishandles nonexistent args, or
  428. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  429. # `staff', or /sbin/install on IRIX which has incompatible command-line
  430. # syntax.  Sigh.
  431. #
  432. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  433. #     anyway.
  434. # This turns out not to be true, so the mere pathname isn't an indication
  435. # of whether the program works.  What we really need is a set of tests for
  436. # the install program to see if it actually works in all the required ways.
  437. #
  438. # Avoid using ./install, which might have been erroneously created
  439. # by make from ./install.sh.
  440. if test -z "${INSTALL}"; then
  441.   test -n "$silent" || echo "checking for a BSD compatible install"
  442.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  443.   for ac_dir in $PATH; do
  444.     case "$ac_dir" in
  445.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  446.     *)
  447.       # OSF1 and SCO ODT 3.0 have their own names for install.
  448.       for ac_prog in installbsd scoinst install; do
  449.         if test -f $ac_dir/$ac_prog; then
  450.       if test $ac_prog = install &&
  451.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  452.         # AIX install.  It has an incompatible calling convention.
  453.         # OSF/1 installbsd also uses dspmsg, but is usable.
  454.         :
  455.       else
  456.         INSTALL="$ac_dir/$ac_prog -c"
  457.         break 2
  458.       fi
  459.     fi
  460.       done
  461.       ;;
  462.     esac
  463.   done
  464.   IFS="$ac_save_ifs"
  465. fi
  466.  
  467. if test -z "$INSTALL"; then
  468.   # As a last resort, use the slow shell script.
  469.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  470.     if test -f $ac_dir/install.sh; then
  471.       INSTALL="$ac_dir/install.sh -c"; break
  472.     fi
  473.   done
  474. fi
  475. if test -z "$INSTALL"; then
  476.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  477. fi
  478. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  479.  
  480. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  481. # It thinks the first close brace ends the variable substitution.
  482. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  483. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  484.  
  485. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  486. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  487.  
  488. if test -z "$F2C"; then
  489.   # Extract the first word of `f2c', so it can be a program name with args.
  490.   set ac_dummy f2c; ac_word=$2
  491.   test -n "$silent" || echo "checking for $ac_word"
  492.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  493.   for ac_dir in $PATH; do
  494.     test -z "$ac_dir" && ac_dir=.
  495.     if test -f $ac_dir/$ac_word; then
  496.       F2C="f2c"
  497.       break
  498.     fi
  499.   done
  500.   IFS="$ac_save_ifs"
  501. fi
  502.  
  503. test -n "$F2C" && test -n "$verbose" && echo "    setting F2C to $F2C"
  504.  
  505.  
  506.  
  507. # check whether --with-cc or --without-cc was given.
  508. withval="$with_cc"
  509. if test -n "$withval"; then
  510.   CC="cc"
  511. fi
  512.  
  513. # check whether --with-gcc or --without-gcc was given.
  514. withval="$with_gcc"
  515. if test -n "$withval"; then
  516.   CC="gcc" GCC=1
  517. fi
  518.  
  519.  
  520.  
  521. if test -z "$CC" ; then
  522.   if test -z "$CC"; then
  523.   # Extract the first word of `gcc', so it can be a program name with args.
  524.   set ac_dummy gcc; ac_word=$2
  525.   test -n "$silent" || echo "checking for $ac_word"
  526.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  527.   for ac_dir in $PATH; do
  528.     test -z "$ac_dir" && ac_dir=.
  529.     if test -f $ac_dir/$ac_word; then
  530.       CC="gcc"
  531.       break
  532.     fi
  533.   done
  534.   IFS="$ac_save_ifs"
  535. fi
  536. test -z "$CC" && CC="cc"
  537. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  538.  
  539. # Find out if we are using GNU C, under whatever name.
  540. cat > conftest.c <<EOF
  541. #ifdef __GNUC__
  542.   yes
  543. #endif
  544. EOF
  545. ${CC-cc} -E conftest.c > conftest.out 2>&1
  546. if egrep yes conftest.out >/dev/null 2>&1; then
  547.   GCC=1 # For later tests.
  548. fi
  549. rm -f conftest*
  550.  
  551. fi
  552.  
  553.  
  554. ac_prog='/* Ultrix mips cc rejects this.  */
  555. typedef int charset[2]; const charset x;
  556. /* SunOS 4.1.1 cc rejects this.  */
  557. char const *const *ccp;
  558. char **p;
  559. /* AIX XL C 1.02.0.0 rejects this.
  560.    It does not let you subtract one const X* pointer from another in an arm
  561.    of an if-expression whose if-part is not a constant expression */
  562. const char *g = "string";
  563. ccp = &g + (g ? g-g : 0);
  564. /* HPUX 7.0 cc rejects these. */
  565. ++ccp;
  566. p = (char**) ccp;
  567. ccp = (char const *const *) p;
  568. { /* SCO 3.2v4 cc rejects this.  */
  569.   char *t;
  570.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  571.  
  572.   *t++ = 0;
  573. }
  574. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  575.   int x[] = {25,17};
  576.   const int *foo = &x[0];
  577.   ++foo;
  578. }
  579. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  580.   typedef const int *iptr;
  581.   iptr p = 0;
  582.   ++p;
  583. }
  584. { /* AIX XL C 1.02.0.0 rejects this saying
  585.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  586.   struct s { int j; const int *ap[3]; };
  587.   struct s *b; b->j = 5;
  588. }
  589. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  590.   const int foo = 10;
  591. }'
  592. test -n "$silent" || echo "checking for lack of working const"
  593. cat > conftest.${ac_ext} <<EOF
  594. #include "confdefs.h"
  595.  
  596. int main() { return 0; }
  597. int t() { $ac_prog; return 0; }
  598. EOF
  599. if eval $ac_compile; then
  600.   :
  601. else
  602.   rm -rf conftest*
  603.   
  604. {
  605. test -n "$verbose" && \
  606. echo "    defining" const to be empty
  607. echo "#define" const "" >> confdefs.h
  608. DEFS="$DEFS -Dconst="
  609. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  610. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  611. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  612. "
  613. }
  614.  
  615. fi
  616. rm -f conftest*
  617.  
  618. test -n "$silent" || echo "checking for size_t in sys/types.h"
  619. test -n "$silent" || echo "checking how to run the C preprocessor"
  620. if test -z "$CPP"; then
  621.   # This must be in double quotes, not single quotes, because CPP may get
  622.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  623.   # make.  It must be expanded now.
  624.   CPP="${CC-cc} -E"
  625.   cat > conftest.${ac_ext} <<EOF
  626. #include "confdefs.h"
  627. #include <stdio.h>
  628. Syntax Error
  629. EOF
  630. # Some shells (Coherent) do redirections in the wrong order, so need
  631. # the parens.
  632. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  633. if test -z "$ac_err"; then
  634.   :
  635. else
  636.   rm -rf conftest*
  637.   CPP="${CC-cc} -E -traditional-cpp"
  638.   cat > conftest.${ac_ext} <<EOF
  639. #include "confdefs.h"
  640. #include <stdio.h>
  641. Syntax Error
  642. EOF
  643. # Some shells (Coherent) do redirections in the wrong order, so need
  644. # the parens.
  645. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  646. if test -z "$ac_err"; then
  647.   :
  648. else
  649.   rm -rf conftest*
  650.   CPP=/lib/cpp
  651. fi
  652. rm -f conftest*
  653. fi
  654. rm -f conftest*
  655. fi
  656. test -n "$verbose" && echo "    setting CPP to $CPP"
  657.  
  658. echo '#include "confdefs.h"
  659. #include <sys/types.h>' > conftest.${ac_ext}
  660. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  661. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  662.   :
  663. else
  664.   rm -rf conftest*
  665.   
  666. {
  667. test -n "$verbose" && \
  668. echo "    defining" size_t to be "unsigned"
  669. echo "#define" size_t "unsigned" >> confdefs.h
  670. DEFS="$DEFS -Dsize_t=unsigned"
  671. ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
  672. \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
  673. \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
  674. "
  675. }
  676.  
  677. fi
  678. rm -f conftest*
  679.  
  680. test -n "$silent" || echo "checking byte ordering"
  681. cat > conftest.${ac_ext} <<EOF
  682. #include "confdefs.h"
  683. main () {
  684.   /* Are we little or big endian?  From Harbison&Steele.  */
  685.   union
  686.   {
  687.     long l;
  688.     char c[sizeof (long)];
  689.   } u;
  690.   u.l = 1;
  691.   exit (u.c[sizeof (long) - 1] == 1);
  692. }
  693. EOF
  694. eval $ac_compile
  695. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  696.   :
  697. else
  698.   
  699. {
  700. test -n "$verbose" && \
  701. echo "    defining WORDS_BIGENDIAN"
  702. echo "#define" WORDS_BIGENDIAN "1" >> confdefs.h
  703. DEFS="$DEFS -DWORDS_BIGENDIAN=1"
  704. ac_sed_defs="${ac_sed_defs}\${ac_dA}WORDS_BIGENDIAN\${ac_dB}WORDS_BIGENDIAN\${ac_dC}1\${ac_dD}
  705. \${ac_uA}WORDS_BIGENDIAN\${ac_uB}WORDS_BIGENDIAN\${ac_uC}1\${ac_uD}
  706. \${ac_eA}WORDS_BIGENDIAN\${ac_eB}WORDS_BIGENDIAN\${ac_eC}1\${ac_eD}
  707. "
  708. }
  709.  
  710. fi
  711. rm -fr conftest*
  712.  
  713.  
  714. if test -z "$PAGER"; then
  715.   # Extract the first word of `less', so it can be a program name with args.
  716.   set ac_dummy less; ac_word=$2
  717.   test -n "$silent" || echo "checking for $ac_word"
  718.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  719.   for ac_dir in $PATH; do
  720.     test -z "$ac_dir" && ac_dir=.
  721.     if test -f $ac_dir/$ac_word; then
  722.       PAGER="less"
  723.       break
  724.     fi
  725.   done
  726.   IFS="$ac_save_ifs"
  727. fi
  728.  
  729. test -n "$PAGER" && test -n "$verbose" && echo "    setting PAGER to $PAGER"
  730.  
  731.  
  732.   if test -z "$PAGER" ; then
  733.      if test -z "$PAGER"; then
  734.   # Extract the first word of `more', so it can be a program name with args.
  735.   set ac_dummy more; ac_word=$2
  736.   test -n "$silent" || echo "checking for $ac_word"
  737.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  738.   for ac_dir in $PATH; do
  739.     test -z "$ac_dir" && ac_dir=.
  740.     if test -f $ac_dir/$ac_word; then
  741.       PAGER="more"
  742.       break
  743.     fi
  744.   done
  745.   IFS="$ac_save_ifs"
  746. fi
  747.  
  748. test -n "$PAGER" && test -n "$verbose" && echo "    setting PAGER to $PAGER"
  749.  
  750.     if test -z "$PAGER" ; then
  751.        if test -z "$PAGER"; then
  752.   # Extract the first word of `pg', so it can be a program name with args.
  753.   set ac_dummy pg; ac_word=$2
  754.   test -n "$silent" || echo "checking for $ac_word"
  755.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  756.   for ac_dir in $PATH; do
  757.     test -z "$ac_dir" && ac_dir=.
  758.     if test -f $ac_dir/$ac_word; then
  759.       PAGER="pg"
  760.       break
  761.     fi
  762.   done
  763.   IFS="$ac_save_ifs"
  764. fi
  765.  
  766. test -n "$PAGER" && test -n "$verbose" && echo "    setting PAGER to $PAGER"
  767.  
  768.     fi
  769.   fi
  770.  
  771.  
  772. cat > conftest.${ac_ext} <<EOF
  773. #include "confdefs.h"
  774. #ifdef titan
  775.  yes
  776. #endif
  777.  
  778. EOF
  779. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  780. if egrep "yes" conftest.out >/dev/null 2>&1; then
  781.   rm -rf conftest*
  782.   TITAN=1
  783.  
  784. fi
  785. rm -f conftest*
  786.  
  787.  
  788. test -n "$silent" || echo "checking for elf.h"
  789. cat > conftest.${ac_ext} <<EOF
  790. #include "confdefs.h"
  791. #include <elf.h>
  792. EOF
  793. # Some shells (Coherent) do redirections in the wrong order, so need
  794. # the parens.
  795. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  796. if test -z "$ac_err"; then
  797.   rm -rf conftest*
  798.   
  799. {
  800. test -n "$verbose" && \
  801. echo "    defining SVR4"
  802. echo "#define" SVR4 "1" >> confdefs.h
  803. DEFS="$DEFS -DSVR4=1"
  804. ac_sed_defs="${ac_sed_defs}\${ac_dA}SVR4\${ac_dB}SVR4\${ac_dC}1\${ac_dD}
  805. \${ac_uA}SVR4\${ac_uB}SVR4\${ac_uC}1\${ac_uD}
  806. \${ac_eA}SVR4\${ac_eB}SVR4\${ac_eC}1\${ac_eD}
  807. "
  808. }
  809.  
  810.  
  811. fi
  812. rm -f conftest*
  813.  
  814.  
  815.  
  816. # check whether --with-NALIBS or --without-NALIBS was given.
  817. withval="$with_NALIBS"
  818. if test -n "$withval"; then
  819.    
  820.   echo "look for Numerical Analysis LIBS in $withval"
  821.   LIBS="$LIBS -L$withval"
  822.   NALIB_DIR="-L$withval "
  823.  
  824. else
  825.   
  826.   NALIB_DIR=""
  827.  
  828. fi
  829.  
  830.  
  831. ac_save_LIBS="${LIBS}"
  832. LIBS="${LIBS} -lClapack"
  833. ac_have_lib=""
  834. test -n "$silent" || echo "checking for -lClapack"
  835. cat > conftest.${ac_ext} <<EOF
  836. #include "confdefs.h"
  837.  
  838. int main() { return 0; }
  839. int t() { main();; return 0; }
  840. EOF
  841. if eval $ac_compile; then
  842.   rm -rf conftest*
  843.   ac_have_lib="1"
  844.  
  845. fi
  846. rm -f conftest*
  847. LIBS="${ac_save_LIBS}"
  848. if test -n "${ac_have_lib}"; then
  849.    :; NALIBS="$NALIB_DIR -lClapack"
  850. else
  851.    :; 
  852.    echo "WARNING: Cannot find libClapack.a,  use --with-NALIBS option" 
  853. fi
  854.  
  855. ac_save_LIBS="${LIBS}"
  856. LIBS="${LIBS} -lCblas"
  857. ac_have_lib=""
  858. test -n "$silent" || echo "checking for -lCblas"
  859. cat > conftest.${ac_ext} <<EOF
  860. #include "confdefs.h"
  861.  
  862. int main() { return 0; }
  863. int t() { main();; return 0; }
  864. EOF
  865. if eval $ac_compile; then
  866.   rm -rf conftest*
  867.   ac_have_lib="1"
  868.  
  869. fi
  870. rm -f conftest*
  871. LIBS="${ac_save_LIBS}"
  872. if test -n "${ac_have_lib}"; then
  873.    :; NALIBS="$NALIBS -lCblas"
  874. else
  875.    :; 
  876.    echo "WARNING: Cannot find libCblas.a,    use --with-NALIBS option" 
  877. fi
  878.  
  879. ac_save_LIBS="${LIBS}"
  880. LIBS="${LIBS} -lCfftpack"
  881. ac_have_lib=""
  882. test -n "$silent" || echo "checking for -lCfftpack"
  883. cat > conftest.${ac_ext} <<EOF
  884. #include "confdefs.h"
  885.  
  886. int main() { return 0; }
  887. int t() { main();; return 0; }
  888. EOF
  889. if eval $ac_compile; then
  890.   rm -rf conftest*
  891.   ac_have_lib="1"
  892.  
  893. fi
  894. rm -f conftest*
  895. LIBS="${ac_save_LIBS}"
  896. if test -n "${ac_have_lib}"; then
  897.    :; NALIBS="$NALIBS -lCfftpack"
  898. else
  899.    :; 
  900.    echo "WARNING: Cannot find libCfftpack.a, use --with-NALIBS option" 
  901. fi
  902.  
  903. ac_save_LIBS="${LIBS}"
  904. LIBS="${LIBS} -lCranlib"
  905. ac_have_lib=""
  906. test -n "$silent" || echo "checking for -lCranlib"
  907. cat > conftest.${ac_ext} <<EOF
  908. #include "confdefs.h"
  909.  
  910. int main() { return 0; }
  911. int t() { main();; return 0; }
  912. EOF
  913. if eval $ac_compile; then
  914.   rm -rf conftest*
  915.   ac_have_lib="1"
  916.  
  917. fi
  918. rm -f conftest*
  919. LIBS="${ac_save_LIBS}"
  920. if test -n "${ac_have_lib}"; then
  921.    :; NALIBS="$NALIBS -lCranlib"
  922. else
  923.    :; 
  924.    echo "WARNING: Cannot find libCranlib.a,  use --with-NALIBS option" 
  925. fi
  926.  
  927.  
  928.  
  929. ac_save_LIBS="${LIBS}"
  930. LIBS="${LIBS} -lreadline"
  931. ac_have_lib=""
  932. test -n "$silent" || echo "checking for -lreadline"
  933. cat > conftest.${ac_ext} <<EOF
  934. #include "confdefs.h"
  935.  
  936. int main() { return 0; }
  937. int t() { main();; return 0; }
  938. EOF
  939. if eval $ac_compile; then
  940.   rm -rf conftest*
  941.   ac_have_lib="1"
  942.  
  943. fi
  944. rm -f conftest*
  945. LIBS="${ac_save_LIBS}"
  946. if test -n "${ac_have_lib}"; then
  947.    :; CMDLIBS="$LIBS -lreadline"
  948. else
  949.    :; READLINE="no"
  950. fi
  951.  
  952.  
  953. if test -z "$READLINE" ; then
  954.    
  955. {
  956. test -n "$verbose" && \
  957. echo "    defining" HAVE_READLINE to be "1"
  958. echo "#define" HAVE_READLINE "1" >> confdefs.h
  959. DEFS="$DEFS -DHAVE_READLINE=1"
  960. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_READLINE\${ac_dB}HAVE_READLINE\${ac_dC}1\${ac_dD}
  961. \${ac_uA}HAVE_READLINE\${ac_uB}HAVE_READLINE\${ac_uC}1\${ac_uD}
  962. \${ac_eA}HAVE_READLINE\${ac_eB}HAVE_READLINE\${ac_eC}1\${ac_eD}
  963. "
  964. }
  965.  
  966.     ac_save_LIBS="${LIBS}"
  967. LIBS="${LIBS} -ltermcap"
  968. ac_have_lib=""
  969. test -n "$silent" || echo "checking for -ltermcap"
  970. cat > conftest.${ac_ext} <<EOF
  971. #include "confdefs.h"
  972.  
  973. int main() { return 0; }
  974. int t() { main();; return 0; }
  975. EOF
  976. if eval $ac_compile; then
  977.   rm -rf conftest*
  978.   ac_have_lib="1"
  979.  
  980. fi
  981. rm -f conftest*
  982. LIBS="${ac_save_LIBS}"
  983. if test -n "${ac_have_lib}"; then
  984.    :; CMDLIBS="$CMDLIBS -ltermcap"
  985. else
  986.    :; 
  987. fi
  988.  
  989. fi
  990.  
  991.  
  992.  
  993. # check whether --with-FLIBS or --without-FLIBS was given.
  994. withval="$with_FLIBS"
  995. if test -n "$withval"; then
  996.    
  997.   echo "look for F2C LIBS in $withval"
  998.   LIBS="$LIBS -L$withval"
  999.   FLIB_DIR="-L$withval"
  1000.  
  1001. else
  1002.   
  1003.   FLIB_DIR=""
  1004.  
  1005. fi
  1006.  
  1007.  
  1008. ac_save_LIBS="${LIBS}"
  1009. LIBS="${LIBS} -lf2c"
  1010. ac_have_lib=""
  1011. test -n "$silent" || echo "checking for -lf2c"
  1012. cat > conftest.${ac_ext} <<EOF
  1013. #include "confdefs.h"
  1014.  
  1015. int main() { return 0; }
  1016. int t() { main();; return 0; }
  1017. EOF
  1018. if eval $ac_compile; then
  1019.   rm -rf conftest*
  1020.   ac_have_lib="1"
  1021.  
  1022. fi
  1023. rm -f conftest*
  1024. LIBS="${ac_save_LIBS}"
  1025. if test -n "${ac_have_lib}"; then
  1026.    :; FLIBS="$FLIB_DIR -lf2c"
  1027. else
  1028.    :; 
  1029. fi
  1030.  
  1031.  
  1032. if test -z "$FLIBS" ; then
  1033.    ac_save_LIBS="${LIBS}"
  1034. LIBS="${LIBS} -lF77"
  1035. ac_have_lib=""
  1036. test -n "$silent" || echo "checking for -lF77"
  1037. cat > conftest.${ac_ext} <<EOF
  1038. #include "confdefs.h"
  1039.  
  1040. int main() { return 0; }
  1041. int t() { main();; return 0; }
  1042. EOF
  1043. if eval $ac_compile; then
  1044.   rm -rf conftest*
  1045.   ac_have_lib="1"
  1046.  
  1047. fi
  1048. rm -f conftest*
  1049. LIBS="${ac_save_LIBS}"
  1050. if test -n "${ac_have_lib}"; then
  1051.    :; FLIBS="$FLIB_DIR -lF77"
  1052. else
  1053.    :; 
  1054. fi
  1055.  
  1056.     ac_save_LIBS="${LIBS}"
  1057. LIBS="${LIBS} -lI77"
  1058. ac_have_lib=""
  1059. test -n "$silent" || echo "checking for -lI77"
  1060. cat > conftest.${ac_ext} <<EOF
  1061. #include "confdefs.h"
  1062.  
  1063. int main() { return 0; }
  1064. int t() { main();; return 0; }
  1065. EOF
  1066. if eval $ac_compile; then
  1067.   rm -rf conftest*
  1068.   ac_have_lib="1"
  1069.  
  1070. fi
  1071. rm -f conftest*
  1072. LIBS="${ac_save_LIBS}"
  1073. if test -n "${ac_have_lib}"; then
  1074.    :; FLIBS="$FLIBS -lI77"
  1075. else
  1076.    :; 
  1077. fi
  1078.  
  1079.     if test -z "$FLIBS" ; then
  1080.       echo "WARNING: Cannot find Fortran libraries,  use --with-FLIBS option"
  1081.     fi 
  1082. fi
  1083.  
  1084.  
  1085.  
  1086.  
  1087. # If we find X, set shell vars x_includes and x_libraries to the paths.
  1088. no_x=true
  1089. if test "x$with_x" != xno; then
  1090. test -n "$silent" || echo "checking for X include and library files with xmkmf"
  1091. rm -fr conftestdir
  1092. if mkdir conftestdir; then
  1093.   cd conftestdir
  1094.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1095.   cat > Imakefile <<'EOF'
  1096. acfindx:
  1097.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1098. EOF
  1099.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1100.     no_x=
  1101.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1102.     eval `make acfindx 2>/dev/null | grep -v make`
  1103.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1104.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  1105.     then
  1106.       ac_im_usrlibdir=$ac_im_libdir
  1107.     fi
  1108.     case "$ac_im_incroot" in
  1109.     /usr/include) ;;
  1110.     *) test -z "$x_includes" && x_includes="$ac_im_incroot" ;;
  1111.     esac
  1112.     case "$ac_im_usrlibdir" in
  1113.     /usr/lib | /lib) ;;
  1114.     *) test -z "$x_libraries" && x_libraries="$ac_im_usrlibdir" ;;
  1115.     esac
  1116.   fi
  1117.   cd ..
  1118.   rm -fr conftestdir
  1119. fi
  1120.  
  1121. if test -z "$ac_im_usrlibdir"; then
  1122. test -n "$silent" || echo "checking for X include and library files directly"
  1123. if test ".$x_direct_test_library" = . ; then
  1124.    x_direct_test_library='Xt'
  1125. fi
  1126. if test ".$x_direct_test_include" = . ; then
  1127.    x_direct_test_include='X11/Intrinsic.h'
  1128. fi
  1129. cat > conftest.${ac_ext} <<EOF
  1130. #include "confdefs.h"
  1131. #include <$x_direct_test_include>
  1132. EOF
  1133. # Some shells (Coherent) do redirections in the wrong order, so need
  1134. # the parens.
  1135. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1136. if test -z "$ac_err"; then
  1137.   rm -rf conftest*
  1138.   no_x=
  1139.  
  1140. else
  1141.   rm -rf conftest*
  1142.   for ac_dir in               \
  1143.     /usr/X11R6/include        \
  1144.     /usr/X11R5/include        \
  1145.     /usr/X11R4/include        \
  1146.                               \
  1147.     /usr/include/X11R6        \
  1148.     /usr/include/X11R5        \
  1149.     /usr/include/X11R4        \
  1150.                               \
  1151.     /usr/local/X11R6/include  \
  1152.     /usr/local/X11R5/include  \
  1153.     /usr/local/X11R4/include  \
  1154.                               \
  1155.     /usr/local/include/X11R6  \
  1156.     /usr/local/include/X11R5  \
  1157.     /usr/local/include/X11R4  \
  1158.                               \
  1159.     /usr/X11/include          \
  1160.     /usr/include/X11          \
  1161.     /usr/local/X11/include    \
  1162.     /usr/local/include/X11    \
  1163.                               \
  1164.     /usr/X386/include         \
  1165.     /usr/x386/include         \
  1166.     /usr/XFree86/include/X11  \
  1167.                               \
  1168.     /usr/include              \
  1169.     /usr/local/include        \
  1170.     /usr/unsupported/include  \
  1171.     /usr/athena/include       \
  1172.     /usr/local/x11r5/include  \
  1173.     /usr/lpp/Xamples/include  \
  1174.                               \
  1175.     /usr/openwin/include      \
  1176.     /usr/openwin/share/include \
  1177.     ; \
  1178.   do
  1179.     if test -r "$ac_dir/$x_direct_test_include"; then
  1180.       test -z "$x_includes" && x_includes=$ac_dir
  1181.       no_x=
  1182.       break
  1183.     fi
  1184.   done
  1185. fi
  1186. rm -f conftest*
  1187.  
  1188. # Check for the libraries.  First see if replacing the `include' by
  1189. # `lib' works.
  1190. ac_save_LIBS="${LIBS}"
  1191. LIBS="${LIBS} -l"$x_direct_test_library""
  1192. ac_have_lib=""
  1193. test -n "$silent" || echo "checking for -l"$x_direct_test_library""
  1194. cat > conftest.${ac_ext} <<EOF
  1195. #include "confdefs.h"
  1196.  
  1197. int main() { return 0; }
  1198. int t() { main();; return 0; }
  1199. EOF
  1200. if eval $ac_compile; then
  1201.   rm -rf conftest*
  1202.   ac_have_lib="1"
  1203.  
  1204. fi
  1205. rm -f conftest*
  1206. LIBS="${ac_save_LIBS}"
  1207. if test -n "${ac_have_lib}"; then
  1208.    :; no_x=
  1209. else
  1210.    :; for ac_dir in `echo "$x_includes" | sed s/include/lib/` \
  1211.     /usr/X11R6/lib        \
  1212.     /usr/X11R5/lib        \
  1213.     /usr/X11R4/lib        \
  1214.                           \
  1215.     /usr/lib/X11R6        \
  1216.     /usr/lib/X11R5        \
  1217.     /usr/lib/X11R4        \
  1218.                           \
  1219.     /usr/local/X11R6/lib  \
  1220.     /usr/local/X11R5/lib  \
  1221.     /usr/local/X11R4/lib  \
  1222.                           \
  1223.     /usr/local/lib/X11R6  \
  1224.     /usr/local/lib/X11R5  \
  1225.     /usr/local/lib/X11R4  \
  1226.                           \
  1227.     /usr/X11/lib          \
  1228.     /usr/lib/X11          \
  1229.     /usr/local/X11/lib    \
  1230.     /usr/local/lib/X11    \
  1231.                           \
  1232.     /usr/X386/lib         \
  1233.     /usr/x386/lib         \
  1234.     /usr/XFree86/lib/X11  \
  1235.                           \
  1236.     /usr/lib              \
  1237.     /usr/local/lib        \
  1238.     /usr/unsupported/lib  \
  1239.     /usr/athena/lib       \
  1240.     /usr/local/x11r5/lib  \
  1241.     /usr/lpp/Xamples/lib  \
  1242.                           \
  1243.     /usr/openwin/lib      \
  1244.     /usr/openwin/share/lib \
  1245.     ; \
  1246. do
  1247.   for ac_extension in a so sl; do
  1248.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1249.       test -z "$x_libraries" && x_libraries=$ac_dir
  1250.       no_x=
  1251.       break 2
  1252.     fi
  1253.   done
  1254. done
  1255. fi
  1256.  
  1257. fi
  1258. test -n "$x_includes" && test -n "$verbose" && echo "    X11 headers are in $x_includes"
  1259. test -n "$x_libraries" && test -n "$verbose" && echo "    X11 libraries are in $x_libraries"
  1260. fi
  1261.  
  1262.  
  1263. if test -z "$X11LIB" ; then
  1264.   xlibdir=""
  1265. else
  1266.   xlibdir="-L$x_libraries"
  1267. fi
  1268.  
  1269. X11LIB="$xlibdir -lX11"
  1270.  
  1271.  
  1272. ac_save_LIBS="${LIBS}"
  1273. LIBS="${LIBS} -lnsl"
  1274. ac_have_lib=""
  1275. test -n "$silent" || echo "checking for -lnsl"
  1276. cat > conftest.${ac_ext} <<EOF
  1277. #include "confdefs.h"
  1278.  
  1279. int main() { return 0; }
  1280. int t() { main();; return 0; }
  1281. EOF
  1282. if eval $ac_compile; then
  1283.   rm -rf conftest*
  1284.   ac_have_lib="1"
  1285.  
  1286. fi
  1287. rm -f conftest*
  1288. LIBS="${ac_save_LIBS}"
  1289. if test -n "${ac_have_lib}"; then
  1290.    :; NSL=true
  1291. else
  1292.    :; 
  1293. fi
  1294.  
  1295.  
  1296. if test -n "$NSL" ; then
  1297.   LIBS="$LIBS -lnsl"
  1298.  
  1299.   ac_save_LIBS="${LIBS}"
  1300. LIBS="${LIBS} -lsocket"
  1301. ac_have_lib=""
  1302. test -n "$silent" || echo "checking for -lsocket"
  1303. cat > conftest.${ac_ext} <<EOF
  1304. #include "confdefs.h"
  1305.  
  1306. int main() { return 0; }
  1307. int t() { main();; return 0; }
  1308. EOF
  1309. if eval $ac_compile; then
  1310.   rm -rf conftest*
  1311.   ac_have_lib="1"
  1312.  
  1313. fi
  1314. rm -f conftest*
  1315. LIBS="${ac_save_LIBS}"
  1316. if test -n "${ac_have_lib}"; then
  1317.    :; X11LIB="$X11LIB -lsocket -lnsl"
  1318. else
  1319.    :; 
  1320. fi
  1321.  
  1322.  
  1323. fi
  1324.  
  1325.  
  1326. # check whether --with-PLIBS or --without-PLIBS was given.
  1327. withval="$with_PLIBS"
  1328. if test -n "$withval"; then
  1329.    
  1330.   echo "look for PLPLOT library $withval"
  1331.   LIBS="$LIBS -L$withval"
  1332.   PLIB_DIR="-L$withval"
  1333.   PLIB_INC="$withval"
  1334.  
  1335. else
  1336.   
  1337.   LIBS="$LIBS -L/usr/local/lib"
  1338.   PLIB_DIR="-L/usr/local/lib"
  1339.   PLIB_INC="/usr/local/include"
  1340.  
  1341. fi
  1342.  
  1343.  
  1344. ac_save_LIBS="${LIBS}"
  1345. LIBS="${LIBS} -lplplotdX"
  1346. ac_have_lib=""
  1347. test -n "$silent" || echo "checking for -lplplotdX"
  1348. cat > conftest.${ac_ext} <<EOF
  1349. #include "confdefs.h"
  1350.  
  1351. int main() { return 0; }
  1352. int t() { main();; return 0; }
  1353. EOF
  1354. if eval $ac_compile; then
  1355.   rm -rf conftest*
  1356.   ac_have_lib="1"
  1357.  
  1358. fi
  1359. rm -f conftest*
  1360. LIBS="${ac_save_LIBS}"
  1361. if test -n "${ac_have_lib}"; then
  1362.    :; PLIBS="$PLIB_DIR -lplplotdX $X11LIB"
  1363. else
  1364.    :; 
  1365. fi
  1366.  
  1367.  
  1368. if test -z "$PLIBS" ; then
  1369.    ac_save_LIBS="${LIBS}"
  1370. LIBS="${LIBS} -lplplotdtk"
  1371. ac_have_lib=""
  1372. test -n "$silent" || echo "checking for -lplplotdtk"
  1373. cat > conftest.${ac_ext} <<EOF
  1374. #include "confdefs.h"
  1375.  
  1376. int main() { return 0; }
  1377. int t() { main();; return 0; }
  1378. EOF
  1379. if eval $ac_compile; then
  1380.   rm -rf conftest*
  1381.   ac_have_lib="1"
  1382.  
  1383. fi
  1384. rm -f conftest*
  1385. LIBS="${ac_save_LIBS}"
  1386. if test -n "${ac_have_lib}"; then
  1387.    :; PLIBS="$PLIB_DIR -lplplotdtk -ltk -ltcl $X11LIB"
  1388. else
  1389.    :; 
  1390. fi
  1391.  
  1392. fi
  1393.  
  1394.  
  1395.  
  1396. if test -n "$PLIBS" ; then
  1397.    
  1398. {
  1399. test -n "$verbose" && \
  1400. echo "    defining" HAVE_RLAB_PLPLOT to be "1"
  1401. echo "#define" HAVE_RLAB_PLPLOT "1" >> confdefs.h
  1402. DEFS="$DEFS -DHAVE_RLAB_PLPLOT=1"
  1403. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_RLAB_PLPLOT\${ac_dB}HAVE_RLAB_PLPLOT\${ac_dC}1\${ac_dD}
  1404. \${ac_uA}HAVE_RLAB_PLPLOT\${ac_uB}HAVE_RLAB_PLPLOT\${ac_uC}1\${ac_uD}
  1405. \${ac_eA}HAVE_RLAB_PLPLOT\${ac_eB}HAVE_RLAB_PLPLOT\${ac_eC}1\${ac_eD}
  1406. "
  1407. }
  1408.  
  1409.     PLOT_PROG="plplot"
  1410.     PLIB_INC_DIR="-I$PLIB_INC"
  1411.   else
  1412.    if test -z "$PLOT_PROG"; then
  1413.   # Extract the first word of `gnuplot', so it can be a program name with args.
  1414.   set ac_dummy gnuplot; ac_word=$2
  1415.   test -n "$silent" || echo "checking for $ac_word"
  1416.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1417.   for ac_dir in $PATH; do
  1418.     test -z "$ac_dir" && ac_dir=.
  1419.     if test -f $ac_dir/$ac_word; then
  1420.       PLOT_PROG="gnuplot"
  1421.       break
  1422.     fi
  1423.   done
  1424.   IFS="$ac_save_ifs"
  1425. fi
  1426. test -z "$PLOT_PROG" && PLOT_PROG="nothing"
  1427. test -n "$PLOT_PROG" && test -n "$verbose" && echo "    setting PLOT_PROG to $PLOT_PROG"
  1428.  
  1429.     PLIB_INC_DIR=""
  1430. fi
  1431.  
  1432.  
  1433.  
  1434. if test -z "$TITAN" ; then
  1435.  test -n "$silent" || echo "checking for ANSI C header files"
  1436. cat > conftest.${ac_ext} <<EOF
  1437. #include "confdefs.h"
  1438. #include <stdlib.h>
  1439. #include <stdarg.h>
  1440. #include <string.h>
  1441. #include <float.h>
  1442. EOF
  1443. # Some shells (Coherent) do redirections in the wrong order, so need
  1444. # the parens.
  1445. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1446. if test -z "$ac_err"; then
  1447.   rm -rf conftest*
  1448.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1449. echo '#include "confdefs.h"
  1450. #include <string.h>' > conftest.${ac_ext}
  1451. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1452. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1453.   rm -rf conftest*
  1454.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1455. cat > conftest.${ac_ext} <<EOF
  1456. #include "confdefs.h"
  1457. #include <ctype.h>
  1458. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1459. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1460. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1461. int main () { int i; for (i = 0; i < 256; i++)
  1462. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1463. exit (0); }
  1464.  
  1465. EOF
  1466. eval $ac_compile
  1467. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1468.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1469. echo '#include "confdefs.h"
  1470. #include <stdlib.h>' > conftest.${ac_ext}
  1471. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1472. if egrep "free" conftest.out >/dev/null 2>&1; then
  1473.   rm -rf conftest*
  1474.   
  1475. {
  1476. test -n "$verbose" && \
  1477. echo "    defining STDC_HEADERS"
  1478. echo "#define" STDC_HEADERS "1" >> confdefs.h
  1479. DEFS="$DEFS -DSTDC_HEADERS=1"
  1480. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  1481. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  1482. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  1483. "
  1484. }
  1485.  
  1486.  
  1487. fi
  1488. rm -f conftest*
  1489.  
  1490.  
  1491. fi
  1492. rm -fr conftest*
  1493.  
  1494. fi
  1495. rm -f conftest*
  1496.  
  1497.  
  1498. fi
  1499. rm -f conftest*
  1500.  
  1501.   test -n "$silent" || echo "checking for directory library header"
  1502. ac_dir_header=
  1503. if test -z "$ac_dir_header"; then
  1504.   test -n "$silent" || echo "checking for dirent.h"
  1505. cat > conftest.${ac_ext} <<EOF
  1506. #include "confdefs.h"
  1507. #include <sys/types.h>
  1508. #include <dirent.h>
  1509. int main() { return 0; }
  1510. int t() { DIR *dirp = 0;; return 0; }
  1511. EOF
  1512. if eval $ac_compile; then
  1513.   rm -rf conftest*
  1514.   
  1515. {
  1516. test -n "$verbose" && \
  1517. echo "    defining DIRENT"
  1518. echo "#define" DIRENT "1" >> confdefs.h
  1519. DEFS="$DEFS -DDIRENT=1"
  1520. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  1521. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  1522. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  1523. "
  1524. }
  1525.  ac_dir_header=dirent.h
  1526.  
  1527. fi
  1528. rm -f conftest*
  1529. fi
  1530. if test -z "$ac_dir_header"; then
  1531.   test -n "$silent" || echo "checking for sys/ndir.h"
  1532. cat > conftest.${ac_ext} <<EOF
  1533. #include "confdefs.h"
  1534. #include <sys/types.h>
  1535. #include <sys/ndir.h>
  1536. int main() { return 0; }
  1537. int t() { DIR *dirp = 0;; return 0; }
  1538. EOF
  1539. if eval $ac_compile; then
  1540.   rm -rf conftest*
  1541.   
  1542. {
  1543. test -n "$verbose" && \
  1544. echo "    defining SYSNDIR"
  1545. echo "#define" SYSNDIR "1" >> confdefs.h
  1546. DEFS="$DEFS -DSYSNDIR=1"
  1547. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  1548. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  1549. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  1550. "
  1551. }
  1552.  ac_dir_header=sys/ndir.h
  1553.  
  1554. fi
  1555. rm -f conftest*
  1556. fi
  1557. if test -z "$ac_dir_header"; then
  1558.   test -n "$silent" || echo "checking for sys/dir.h"
  1559. cat > conftest.${ac_ext} <<EOF
  1560. #include "confdefs.h"
  1561. #include <sys/types.h>
  1562. #include <sys/dir.h>
  1563. int main() { return 0; }
  1564. int t() { DIR *dirp = 0;; return 0; }
  1565. EOF
  1566. if eval $ac_compile; then
  1567.   rm -rf conftest*
  1568.   
  1569. {
  1570. test -n "$verbose" && \
  1571. echo "    defining SYSDIR"
  1572. echo "#define" SYSDIR "1" >> confdefs.h
  1573. DEFS="$DEFS -DSYSDIR=1"
  1574. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  1575. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  1576. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  1577. "
  1578. }
  1579.  ac_dir_header=sys/dir.h
  1580.  
  1581. fi
  1582. rm -f conftest*
  1583. fi
  1584. if test -z "$ac_dir_header"; then
  1585.   test -n "$silent" || echo "checking for ndir.h"
  1586. cat > conftest.${ac_ext} <<EOF
  1587. #include "confdefs.h"
  1588. #include <sys/types.h>
  1589. #include <ndir.h>
  1590. int main() { return 0; }
  1591. int t() { DIR *dirp = 0;; return 0; }
  1592. EOF
  1593. if eval $ac_compile; then
  1594.   rm -rf conftest*
  1595.   
  1596. {
  1597. test -n "$verbose" && \
  1598. echo "    defining NDIR"
  1599. echo "#define" NDIR "1" >> confdefs.h
  1600. DEFS="$DEFS -DNDIR=1"
  1601. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  1602. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  1603. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  1604. "
  1605. }
  1606.  ac_dir_header=ndir.h
  1607.  
  1608. fi
  1609. rm -f conftest*
  1610. fi
  1611.  
  1612. test -n "$silent" || echo "checking for closedir return value"
  1613. cat > conftest.${ac_ext} <<EOF
  1614. #include "confdefs.h"
  1615. #include <sys/types.h>
  1616. #include <$ac_dir_header>
  1617. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1618. EOF
  1619. eval $ac_compile
  1620. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1621.   :
  1622. else
  1623.   
  1624. {
  1625. test -n "$verbose" && \
  1626. echo "    defining VOID_CLOSEDIR"
  1627. echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  1628. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  1629. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  1630. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  1631. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  1632. "
  1633. }
  1634.  
  1635. fi
  1636. rm -fr conftest*
  1637.  
  1638.   for ac_hdr in stdlib.h time.h float.h ieeefp.h unistd.h
  1639. do
  1640. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  1641. test -n "$silent" || echo "checking for ${ac_hdr}"
  1642. cat > conftest.${ac_ext} <<EOF
  1643. #include "confdefs.h"
  1644. #include <${ac_hdr}>
  1645. EOF
  1646. # Some shells (Coherent) do redirections in the wrong order, so need
  1647. # the parens.
  1648. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1649. if test -z "$ac_err"; then
  1650.   rm -rf conftest*
  1651.   
  1652. {
  1653. test -n "$verbose" && \
  1654. echo "    defining ${ac_tr_hdr}"
  1655. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  1656. DEFS="$DEFS -D${ac_tr_hdr}=1"
  1657. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  1658. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  1659. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  1660. "
  1661. }
  1662.  
  1663.  
  1664. fi
  1665. rm -f conftest*
  1666. done
  1667.  
  1668.     ac_save_LIBS="${LIBS}"
  1669. LIBS="${LIBS} -lm"
  1670. ac_have_lib=""
  1671. test -n "$silent" || echo "checking for -lm"
  1672. cat > conftest.${ac_ext} <<EOF
  1673. #include "confdefs.h"
  1674.  
  1675. int main() { return 0; }
  1676. int t() { main();; return 0; }
  1677. EOF
  1678. if eval $ac_compile; then
  1679.   rm -rf conftest*
  1680.   ac_have_lib="1"
  1681.  
  1682. fi
  1683. rm -f conftest*
  1684. LIBS="${ac_save_LIBS}"
  1685. if test -n "${ac_have_lib}"; then
  1686.    
  1687. {
  1688. test -n "$verbose" && \
  1689. echo "    defining HAVE_LIBM"
  1690. echo "#define" HAVE_LIBM "1" >> confdefs.h
  1691. DEFS="$DEFS -DHAVE_LIBM=1"
  1692. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBM\${ac_dB}HAVE_LIBM\${ac_dC}1\${ac_dD}
  1693. \${ac_uA}HAVE_LIBM\${ac_uB}HAVE_LIBM\${ac_uC}1\${ac_uD}
  1694. \${ac_eA}HAVE_LIBM\${ac_eB}HAVE_LIBM\${ac_eC}1\${ac_eD}
  1695. "
  1696. }
  1697.  
  1698.    LIBS="${LIBS} -lm"
  1699. fi
  1700.  
  1701.   for ac_func in difftime rint rindex matherr fpsetmask
  1702. do
  1703. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1704. test -n "$silent" || echo "checking for ${ac_func}"
  1705. cat > conftest.${ac_ext} <<EOF
  1706. #include "confdefs.h"
  1707. #include <ctype.h>
  1708. int main() { return 0; }
  1709. int t() { 
  1710. /* The GNU C library defines this for functions which it implements
  1711.     to always fail with ENOSYS.  Some functions are actually named
  1712.     something starting with __ and the normal name is an alias.  */
  1713. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1714. choke me
  1715. #else
  1716. /* Override any gcc2 internal prototype to avoid an error.  */
  1717. extern char ${ac_func}(); ${ac_func}();
  1718. #endif
  1719. ; return 0; }
  1720. EOF
  1721. if eval $ac_compile; then
  1722.   rm -rf conftest*
  1723.   {
  1724. test -n "$verbose" && \
  1725. echo "    defining ${ac_tr_func}"
  1726. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  1727. DEFS="$DEFS -D${ac_tr_func}=1"
  1728. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  1729. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  1730. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  1731. "
  1732. }
  1733.  
  1734.  
  1735. fi
  1736. rm -f conftest*
  1737. done
  1738.  
  1739.   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1740. # for constant arguments.  Useless!
  1741. test -n "$silent" || echo "checking for working alloca.h"
  1742. cat > conftest.${ac_ext} <<EOF
  1743. #include "confdefs.h"
  1744. #include <alloca.h>
  1745. int main() { return 0; }
  1746. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  1747. EOF
  1748. if eval $ac_compile; then
  1749.   rm -rf conftest*
  1750.   
  1751. {
  1752. test -n "$verbose" && \
  1753. echo "    defining HAVE_ALLOCA_H"
  1754. echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  1755. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  1756. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  1757. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  1758. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  1759. "
  1760. }
  1761.  
  1762.  
  1763. fi
  1764. rm -f conftest*
  1765.  
  1766. ac_decl="#ifdef __GNUC__
  1767. #define alloca __builtin_alloca
  1768. #else
  1769. #if HAVE_ALLOCA_H
  1770. #include <alloca.h>
  1771. #else
  1772. #ifdef _AIX
  1773.  #pragma alloca
  1774. #else
  1775. char *alloca ();
  1776. #endif
  1777. #endif
  1778. #endif
  1779. "
  1780. test -n "$silent" || echo "checking for alloca"
  1781. cat > conftest.${ac_ext} <<EOF
  1782. #include "confdefs.h"
  1783. $ac_decl
  1784. int main() { return 0; }
  1785. int t() { char *p = (char *) alloca(1);; return 0; }
  1786. EOF
  1787. if eval $ac_compile; then
  1788.   rm -rf conftest*
  1789.   
  1790. {
  1791. test -n "$verbose" && \
  1792. echo "    defining HAVE_ALLOCA"
  1793. echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  1794. DEFS="$DEFS -DHAVE_ALLOCA=1"
  1795. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  1796. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  1797. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  1798. "
  1799. }
  1800.  
  1801.  
  1802. else
  1803.   rm -rf conftest*
  1804.   ac_alloca_missing=1
  1805. cat > conftest.${ac_ext} <<EOF
  1806. #include "confdefs.h"
  1807.  
  1808. #if defined(CRAY) && ! defined(CRAY2)
  1809. winnitude
  1810. #else
  1811. lossage
  1812. #endif
  1813.  
  1814. EOF
  1815. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1816. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  1817.   rm -rf conftest*
  1818.   test -n "$silent" || echo "checking for _getb67"
  1819. cat > conftest.${ac_ext} <<EOF
  1820. #include "confdefs.h"
  1821. #include <ctype.h>
  1822. int main() { return 0; }
  1823. int t() { 
  1824. /* The GNU C library defines this for functions which it implements
  1825.     to always fail with ENOSYS.  Some functions are actually named
  1826.     something starting with __ and the normal name is an alias.  */
  1827. #if defined (__stub__getb67) || defined (__stub____getb67)
  1828. choke me
  1829. #else
  1830. /* Override any gcc2 internal prototype to avoid an error.  */
  1831. extern char _getb67(); _getb67();
  1832. #endif
  1833. ; return 0; }
  1834. EOF
  1835. if eval $ac_compile; then
  1836.   rm -rf conftest*
  1837.   {
  1838. test -n "$verbose" && \
  1839. echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  1840. echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  1841. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  1842. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  1843. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  1844. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  1845. "
  1846. }
  1847.  
  1848.  
  1849. else
  1850.   rm -rf conftest*
  1851.   test -n "$silent" || echo "checking for GETB67"
  1852. cat > conftest.${ac_ext} <<EOF
  1853. #include "confdefs.h"
  1854. #include <ctype.h>
  1855. int main() { return 0; }
  1856. int t() { 
  1857. /* The GNU C library defines this for functions which it implements
  1858.     to always fail with ENOSYS.  Some functions are actually named
  1859.     something starting with __ and the normal name is an alias.  */
  1860. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1861. choke me
  1862. #else
  1863. /* Override any gcc2 internal prototype to avoid an error.  */
  1864. extern char GETB67(); GETB67();
  1865. #endif
  1866. ; return 0; }
  1867. EOF
  1868. if eval $ac_compile; then
  1869.   rm -rf conftest*
  1870.   {
  1871. test -n "$verbose" && \
  1872. echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  1873. echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  1874. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  1875. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  1876. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  1877. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  1878. "
  1879. }
  1880.  
  1881.  
  1882. else
  1883.   rm -rf conftest*
  1884.   test -n "$silent" || echo "checking for getb67"
  1885. cat > conftest.${ac_ext} <<EOF
  1886. #include "confdefs.h"
  1887. #include <ctype.h>
  1888. int main() { return 0; }
  1889. int t() { 
  1890. /* The GNU C library defines this for functions which it implements
  1891.     to always fail with ENOSYS.  Some functions are actually named
  1892.     something starting with __ and the normal name is an alias.  */
  1893. #if defined (__stub_getb67) || defined (__stub___getb67)
  1894. choke me
  1895. #else
  1896. /* Override any gcc2 internal prototype to avoid an error.  */
  1897. extern char getb67(); getb67();
  1898. #endif
  1899. ; return 0; }
  1900. EOF
  1901. if eval $ac_compile; then
  1902.   rm -rf conftest*
  1903.   {
  1904. test -n "$verbose" && \
  1905. echo "    defining" CRAY_STACKSEG_END to be "getb67"
  1906. echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  1907. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  1908. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  1909. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  1910. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  1911. "
  1912. }
  1913.  
  1914.  
  1915. fi
  1916. rm -f conftest*
  1917.  
  1918. fi
  1919. rm -f conftest*
  1920.  
  1921. fi
  1922. rm -f conftest*
  1923.  
  1924.  
  1925. fi
  1926. rm -f conftest*
  1927.  
  1928.  
  1929. fi
  1930. rm -f conftest*
  1931.  
  1932. if test -n "$ac_alloca_missing"; then
  1933.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1934.   # that cause trouble.  Some versions do not even contain alloca or
  1935.   # contain a buggy version.  If you still want to use their alloca,
  1936.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1937.   ALLOCA=alloca.o
  1938.   
  1939. {
  1940. test -n "$verbose" && \
  1941. echo "    defining C_ALLOCA"
  1942. echo "#define" C_ALLOCA "1" >> confdefs.h
  1943. DEFS="$DEFS -DC_ALLOCA=1"
  1944. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  1945. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  1946. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  1947. "
  1948. }
  1949.  
  1950.  
  1951.   test -n "$silent" || echo "checking stack direction for C alloca"
  1952.   test -n "$silent" || echo "checking whether cross-compiling"
  1953. # If we cannot run a trivial program, we must be cross compiling.
  1954. cat > conftest.${ac_ext} <<EOF
  1955. #include "confdefs.h"
  1956. main(){exit(0);}
  1957. EOF
  1958. eval $ac_compile
  1959. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1960.   :
  1961. else
  1962.   cross_compiling=1
  1963. fi
  1964. rm -fr conftest*
  1965.  
  1966. if test -n "$cross_compiling"
  1967. then
  1968.   
  1969. {
  1970. test -n "$verbose" && \
  1971. echo "    defining" STACK_DIRECTION to be "0"
  1972. echo "#define" STACK_DIRECTION "0" >> confdefs.h
  1973. DEFS="$DEFS -DSTACK_DIRECTION=0"
  1974. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  1975. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  1976. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  1977. "
  1978. }
  1979.  
  1980. else
  1981. cat > conftest.${ac_ext} <<EOF
  1982. #include "confdefs.h"
  1983. find_stack_direction ()
  1984. {
  1985.   static char *addr = 0;
  1986.   auto char dummy;
  1987.   if (addr == 0)
  1988.     {
  1989.       addr = &dummy;
  1990.       return find_stack_direction ();
  1991.     }
  1992.   else
  1993.     return (&dummy > addr) ? 1 : -1;
  1994. }
  1995. main ()
  1996. {
  1997.   exit (find_stack_direction() < 0);
  1998. }
  1999. EOF
  2000. eval $ac_compile
  2001. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2002.   
  2003. {
  2004. test -n "$verbose" && \
  2005. echo "    defining" STACK_DIRECTION to be "1"
  2006. echo "#define" STACK_DIRECTION "1" >> confdefs.h
  2007. DEFS="$DEFS -DSTACK_DIRECTION=1"
  2008. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  2009. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  2010. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  2011. "
  2012. }
  2013.  
  2014.  
  2015. else
  2016.   
  2017. {
  2018. test -n "$verbose" && \
  2019. echo "    defining" STACK_DIRECTION to be "-1"
  2020. echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  2021. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  2022. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  2023. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  2024. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  2025. "
  2026. }
  2027.  
  2028. fi
  2029. fi
  2030. rm -fr conftest*
  2031. fi
  2032.  
  2033.   echo '#include "confdefs.h"
  2034. #include <math.h>' > conftest.${ac_ext}
  2035. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2036. if egrep " rint" conftest.out >/dev/null 2>&1; then
  2037.   rm -rf conftest*
  2038.   
  2039. {
  2040. test -n "$verbose" && \
  2041. echo "    defining" HAVE_RINT_DEC to be "1"
  2042. echo "#define" HAVE_RINT_DEC "1" >> confdefs.h
  2043. DEFS="$DEFS -DHAVE_RINT_DEC=1"
  2044. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_RINT_DEC\${ac_dB}HAVE_RINT_DEC\${ac_dC}1\${ac_dD}
  2045. \${ac_uA}HAVE_RINT_DEC\${ac_uB}HAVE_RINT_DEC\${ac_uC}1\${ac_uD}
  2046. \${ac_eA}HAVE_RINT_DEC\${ac_eB}HAVE_RINT_DEC\${ac_eC}1\${ac_eD}
  2047. "
  2048. }
  2049.  
  2050.  
  2051. fi
  2052. rm -f conftest*
  2053.  
  2054.  
  2055. else
  2056.    
  2057. {
  2058. test -n "$verbose" && \
  2059. echo "    defining" TITAN to be "1"
  2060. echo "#define" TITAN "1" >> confdefs.h
  2061. DEFS="$DEFS -DTITAN=1"
  2062. ac_sed_defs="${ac_sed_defs}\${ac_dA}TITAN\${ac_dB}TITAN\${ac_dC}1\${ac_dD}
  2063. \${ac_uA}TITAN\${ac_uB}TITAN\${ac_uC}1\${ac_uD}
  2064. \${ac_eA}TITAN\${ac_eB}TITAN\${ac_eC}1\${ac_eD}
  2065. "
  2066. }
  2067.  
  2068.   test -n "$silent" || echo "checking for directory library header"
  2069. ac_dir_header=
  2070. if test -z "$ac_dir_header"; then
  2071.   test -n "$silent" || echo "checking for dirent.h"
  2072. cat > conftest.${ac_ext} <<EOF
  2073. #include "confdefs.h"
  2074. #include <sys/types.h>
  2075. #include <dirent.h>
  2076. int main() { return 0; }
  2077. int t() { DIR *dirp = 0;; return 0; }
  2078. EOF
  2079. if eval $ac_compile; then
  2080.   rm -rf conftest*
  2081.   
  2082. {
  2083. test -n "$verbose" && \
  2084. echo "    defining DIRENT"
  2085. echo "#define" DIRENT "1" >> confdefs.h
  2086. DEFS="$DEFS -DDIRENT=1"
  2087. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  2088. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  2089. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  2090. "
  2091. }
  2092.  ac_dir_header=dirent.h
  2093.  
  2094. fi
  2095. rm -f conftest*
  2096. fi
  2097. if test -z "$ac_dir_header"; then
  2098.   test -n "$silent" || echo "checking for sys/ndir.h"
  2099. cat > conftest.${ac_ext} <<EOF
  2100. #include "confdefs.h"
  2101. #include <sys/types.h>
  2102. #include <sys/ndir.h>
  2103. int main() { return 0; }
  2104. int t() { DIR *dirp = 0;; return 0; }
  2105. EOF
  2106. if eval $ac_compile; then
  2107.   rm -rf conftest*
  2108.   
  2109. {
  2110. test -n "$verbose" && \
  2111. echo "    defining SYSNDIR"
  2112. echo "#define" SYSNDIR "1" >> confdefs.h
  2113. DEFS="$DEFS -DSYSNDIR=1"
  2114. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  2115. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  2116. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  2117. "
  2118. }
  2119.  ac_dir_header=sys/ndir.h
  2120.  
  2121. fi
  2122. rm -f conftest*
  2123. fi
  2124. if test -z "$ac_dir_header"; then
  2125.   test -n "$silent" || echo "checking for sys/dir.h"
  2126. cat > conftest.${ac_ext} <<EOF
  2127. #include "confdefs.h"
  2128. #include <sys/types.h>
  2129. #include <sys/dir.h>
  2130. int main() { return 0; }
  2131. int t() { DIR *dirp = 0;; return 0; }
  2132. EOF
  2133. if eval $ac_compile; then
  2134.   rm -rf conftest*
  2135.   
  2136. {
  2137. test -n "$verbose" && \
  2138. echo "    defining SYSDIR"
  2139. echo "#define" SYSDIR "1" >> confdefs.h
  2140. DEFS="$DEFS -DSYSDIR=1"
  2141. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  2142. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  2143. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  2144. "
  2145. }
  2146.  ac_dir_header=sys/dir.h
  2147.  
  2148. fi
  2149. rm -f conftest*
  2150. fi
  2151. if test -z "$ac_dir_header"; then
  2152.   test -n "$silent" || echo "checking for ndir.h"
  2153. cat > conftest.${ac_ext} <<EOF
  2154. #include "confdefs.h"
  2155. #include <sys/types.h>
  2156. #include <ndir.h>
  2157. int main() { return 0; }
  2158. int t() { DIR *dirp = 0;; return 0; }
  2159. EOF
  2160. if eval $ac_compile; then
  2161.   rm -rf conftest*
  2162.   
  2163. {
  2164. test -n "$verbose" && \
  2165. echo "    defining NDIR"
  2166. echo "#define" NDIR "1" >> confdefs.h
  2167. DEFS="$DEFS -DNDIR=1"
  2168. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  2169. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  2170. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  2171. "
  2172. }
  2173.  ac_dir_header=ndir.h
  2174.  
  2175. fi
  2176. rm -f conftest*
  2177. fi
  2178.  
  2179. test -n "$silent" || echo "checking for closedir return value"
  2180. cat > conftest.${ac_ext} <<EOF
  2181. #include "confdefs.h"
  2182. #include <sys/types.h>
  2183. #include <$ac_dir_header>
  2184. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  2185. EOF
  2186. eval $ac_compile
  2187. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2188.   :
  2189. else
  2190.   
  2191. {
  2192. test -n "$verbose" && \
  2193. echo "    defining VOID_CLOSEDIR"
  2194. echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  2195. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  2196. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  2197. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  2198. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  2199. "
  2200. }
  2201.  
  2202. fi
  2203. rm -fr conftest*
  2204.  
  2205.   for ac_hdr in stdlib.h time.h unistd.h
  2206. do
  2207. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  2208. test -n "$silent" || echo "checking for ${ac_hdr}"
  2209. cat > conftest.${ac_ext} <<EOF
  2210. #include "confdefs.h"
  2211. #include <${ac_hdr}>
  2212. EOF
  2213. # Some shells (Coherent) do redirections in the wrong order, so need
  2214. # the parens.
  2215. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  2216. if test -z "$ac_err"; then
  2217.   rm -rf conftest*
  2218.   
  2219. {
  2220. test -n "$verbose" && \
  2221. echo "    defining ${ac_tr_hdr}"
  2222. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  2223. DEFS="$DEFS -D${ac_tr_hdr}=1"
  2224. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  2225. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  2226. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  2227. "
  2228. }
  2229.  
  2230.  
  2231. fi
  2232. rm -f conftest*
  2233. done
  2234.  
  2235.     ac_save_LIBS="${LIBS}"
  2236. LIBS="${LIBS} -lm"
  2237. ac_have_lib=""
  2238. test -n "$silent" || echo "checking for -lm"
  2239. cat > conftest.${ac_ext} <<EOF
  2240. #include "confdefs.h"
  2241.  
  2242. int main() { return 0; }
  2243. int t() { main();; return 0; }
  2244. EOF
  2245. if eval $ac_compile; then
  2246.   rm -rf conftest*
  2247.   ac_have_lib="1"
  2248.  
  2249. fi
  2250. rm -f conftest*
  2251. LIBS="${ac_save_LIBS}"
  2252. if test -n "${ac_have_lib}"; then
  2253.    
  2254. {
  2255. test -n "$verbose" && \
  2256. echo "    defining HAVE_LIBM"
  2257. echo "#define" HAVE_LIBM "1" >> confdefs.h
  2258. DEFS="$DEFS -DHAVE_LIBM=1"
  2259. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBM\${ac_dB}HAVE_LIBM\${ac_dC}1\${ac_dD}
  2260. \${ac_uA}HAVE_LIBM\${ac_uB}HAVE_LIBM\${ac_uC}1\${ac_uD}
  2261. \${ac_eA}HAVE_LIBM\${ac_eB}HAVE_LIBM\${ac_eC}1\${ac_eD}
  2262. "
  2263. }
  2264.  
  2265.    LIBS="${LIBS} -lm"
  2266. fi
  2267.  
  2268.   for ac_func in difftime rint rindex
  2269. do
  2270. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2271. test -n "$silent" || echo "checking for ${ac_func}"
  2272. cat > conftest.${ac_ext} <<EOF
  2273. #include "confdefs.h"
  2274. #include <ctype.h>
  2275. int main() { return 0; }
  2276. int t() { 
  2277. /* The GNU C library defines this for functions which it implements
  2278.     to always fail with ENOSYS.  Some functions are actually named
  2279.     something starting with __ and the normal name is an alias.  */
  2280. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2281. choke me
  2282. #else
  2283. /* Override any gcc2 internal prototype to avoid an error.  */
  2284. extern char ${ac_func}(); ${ac_func}();
  2285. #endif
  2286. ; return 0; }
  2287. EOF
  2288. if eval $ac_compile; then
  2289.   rm -rf conftest*
  2290.   {
  2291. test -n "$verbose" && \
  2292. echo "    defining ${ac_tr_func}"
  2293. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2294. DEFS="$DEFS -D${ac_tr_func}=1"
  2295. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2296. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2297. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2298. "
  2299. }
  2300.  
  2301.  
  2302. fi
  2303. rm -f conftest*
  2304. done
  2305.  
  2306.   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2307. # for constant arguments.  Useless!
  2308. test -n "$silent" || echo "checking for working alloca.h"
  2309. cat > conftest.${ac_ext} <<EOF
  2310. #include "confdefs.h"
  2311. #include <alloca.h>
  2312. int main() { return 0; }
  2313. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  2314. EOF
  2315. if eval $ac_compile; then
  2316.   rm -rf conftest*
  2317.   
  2318. {
  2319. test -n "$verbose" && \
  2320. echo "    defining HAVE_ALLOCA_H"
  2321. echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  2322. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  2323. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  2324. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  2325. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  2326. "
  2327. }
  2328.  
  2329.  
  2330. fi
  2331. rm -f conftest*
  2332.  
  2333. ac_decl="#ifdef __GNUC__
  2334. #define alloca __builtin_alloca
  2335. #else
  2336. #if HAVE_ALLOCA_H
  2337. #include <alloca.h>
  2338. #else
  2339. #ifdef _AIX
  2340.  #pragma alloca
  2341. #else
  2342. char *alloca ();
  2343. #endif
  2344. #endif
  2345. #endif
  2346. "
  2347. test -n "$silent" || echo "checking for alloca"
  2348. cat > conftest.${ac_ext} <<EOF
  2349. #include "confdefs.h"
  2350. $ac_decl
  2351. int main() { return 0; }
  2352. int t() { char *p = (char *) alloca(1);; return 0; }
  2353. EOF
  2354. if eval $ac_compile; then
  2355.   rm -rf conftest*
  2356.   
  2357. {
  2358. test -n "$verbose" && \
  2359. echo "    defining HAVE_ALLOCA"
  2360. echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  2361. DEFS="$DEFS -DHAVE_ALLOCA=1"
  2362. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  2363. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  2364. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  2365. "
  2366. }
  2367.  
  2368.  
  2369. else
  2370.   rm -rf conftest*
  2371.   ac_alloca_missing=1
  2372. cat > conftest.${ac_ext} <<EOF
  2373. #include "confdefs.h"
  2374.  
  2375. #if defined(CRAY) && ! defined(CRAY2)
  2376. winnitude
  2377. #else
  2378. lossage
  2379. #endif
  2380.  
  2381. EOF
  2382. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2383. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  2384.   rm -rf conftest*
  2385.   test -n "$silent" || echo "checking for _getb67"
  2386. cat > conftest.${ac_ext} <<EOF
  2387. #include "confdefs.h"
  2388. #include <ctype.h>
  2389. int main() { return 0; }
  2390. int t() { 
  2391. /* The GNU C library defines this for functions which it implements
  2392.     to always fail with ENOSYS.  Some functions are actually named
  2393.     something starting with __ and the normal name is an alias.  */
  2394. #if defined (__stub__getb67) || defined (__stub____getb67)
  2395. choke me
  2396. #else
  2397. /* Override any gcc2 internal prototype to avoid an error.  */
  2398. extern char _getb67(); _getb67();
  2399. #endif
  2400. ; return 0; }
  2401. EOF
  2402. if eval $ac_compile; then
  2403.   rm -rf conftest*
  2404.   {
  2405. test -n "$verbose" && \
  2406. echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  2407. echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  2408. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  2409. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  2410. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  2411. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  2412. "
  2413. }
  2414.  
  2415.  
  2416. else
  2417.   rm -rf conftest*
  2418.   test -n "$silent" || echo "checking for GETB67"
  2419. cat > conftest.${ac_ext} <<EOF
  2420. #include "confdefs.h"
  2421. #include <ctype.h>
  2422. int main() { return 0; }
  2423. int t() { 
  2424. /* The GNU C library defines this for functions which it implements
  2425.     to always fail with ENOSYS.  Some functions are actually named
  2426.     something starting with __ and the normal name is an alias.  */
  2427. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  2428. choke me
  2429. #else
  2430. /* Override any gcc2 internal prototype to avoid an error.  */
  2431. extern char GETB67(); GETB67();
  2432. #endif
  2433. ; return 0; }
  2434. EOF
  2435. if eval $ac_compile; then
  2436.   rm -rf conftest*
  2437.   {
  2438. test -n "$verbose" && \
  2439. echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  2440. echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  2441. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  2442. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  2443. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  2444. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  2445. "
  2446. }
  2447.  
  2448.  
  2449. else
  2450.   rm -rf conftest*
  2451.   test -n "$silent" || echo "checking for getb67"
  2452. cat > conftest.${ac_ext} <<EOF
  2453. #include "confdefs.h"
  2454. #include <ctype.h>
  2455. int main() { return 0; }
  2456. int t() { 
  2457. /* The GNU C library defines this for functions which it implements
  2458.     to always fail with ENOSYS.  Some functions are actually named
  2459.     something starting with __ and the normal name is an alias.  */
  2460. #if defined (__stub_getb67) || defined (__stub___getb67)
  2461. choke me
  2462. #else
  2463. /* Override any gcc2 internal prototype to avoid an error.  */
  2464. extern char getb67(); getb67();
  2465. #endif
  2466. ; return 0; }
  2467. EOF
  2468. if eval $ac_compile; then
  2469.   rm -rf conftest*
  2470.   {
  2471. test -n "$verbose" && \
  2472. echo "    defining" CRAY_STACKSEG_END to be "getb67"
  2473. echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  2474. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  2475. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  2476. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  2477. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  2478. "
  2479. }
  2480.  
  2481.  
  2482. fi
  2483. rm -f conftest*
  2484.  
  2485. fi
  2486. rm -f conftest*
  2487.  
  2488. fi
  2489. rm -f conftest*
  2490.  
  2491.  
  2492. fi
  2493. rm -f conftest*
  2494.  
  2495.  
  2496. fi
  2497. rm -f conftest*
  2498.  
  2499. if test -n "$ac_alloca_missing"; then
  2500.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2501.   # that cause trouble.  Some versions do not even contain alloca or
  2502.   # contain a buggy version.  If you still want to use their alloca,
  2503.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2504.   ALLOCA=alloca.o
  2505.   
  2506. {
  2507. test -n "$verbose" && \
  2508. echo "    defining C_ALLOCA"
  2509. echo "#define" C_ALLOCA "1" >> confdefs.h
  2510. DEFS="$DEFS -DC_ALLOCA=1"
  2511. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  2512. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  2513. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  2514. "
  2515. }
  2516.  
  2517.  
  2518.   test -n "$silent" || echo "checking stack direction for C alloca"
  2519.   if test -n "$cross_compiling"
  2520. then
  2521.   
  2522. {
  2523. test -n "$verbose" && \
  2524. echo "    defining" STACK_DIRECTION to be "0"
  2525. echo "#define" STACK_DIRECTION "0" >> confdefs.h
  2526. DEFS="$DEFS -DSTACK_DIRECTION=0"
  2527. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  2528. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  2529. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  2530. "
  2531. }
  2532.  
  2533. else
  2534. cat > conftest.${ac_ext} <<EOF
  2535. #include "confdefs.h"
  2536. find_stack_direction ()
  2537. {
  2538.   static char *addr = 0;
  2539.   auto char dummy;
  2540.   if (addr == 0)
  2541.     {
  2542.       addr = &dummy;
  2543.       return find_stack_direction ();
  2544.     }
  2545.   else
  2546.     return (&dummy > addr) ? 1 : -1;
  2547. }
  2548. main ()
  2549. {
  2550.   exit (find_stack_direction() < 0);
  2551. }
  2552. EOF
  2553. eval $ac_compile
  2554. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2555.   
  2556. {
  2557. test -n "$verbose" && \
  2558. echo "    defining" STACK_DIRECTION to be "1"
  2559. echo "#define" STACK_DIRECTION "1" >> confdefs.h
  2560. DEFS="$DEFS -DSTACK_DIRECTION=1"
  2561. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  2562. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  2563. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  2564. "
  2565. }
  2566.  
  2567.  
  2568. else
  2569.   
  2570. {
  2571. test -n "$verbose" && \
  2572. echo "    defining" STACK_DIRECTION to be "-1"
  2573. echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  2574. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  2575. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  2576. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  2577. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  2578. "
  2579. }
  2580.  
  2581. fi
  2582. fi
  2583. rm -fr conftest*
  2584. fi
  2585.  
  2586. fi
  2587.  
  2588.  
  2589. test -n "$silent" || echo "checking for fprintf dec"
  2590. cat > conftest.${ac_ext} <<EOF
  2591. #include "confdefs.h"
  2592. #include <stdio.h>
  2593. int main() { return 0; }
  2594. int t() { int (*x)()=(int(*)())fprintf;; return 0; }
  2595. EOF
  2596. if eval $ac_compile; then
  2597.   rm -rf conftest*
  2598.   
  2599. {
  2600. test -n "$verbose" && \
  2601. echo "    defining HAVE_FPRINTF_DEC"
  2602. echo "#define" HAVE_FPRINTF_DEC "1" >> confdefs.h
  2603. DEFS="$DEFS -DHAVE_FPRINTF_DEC=1"
  2604. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FPRINTF_DEC\${ac_dB}HAVE_FPRINTF_DEC\${ac_dC}1\${ac_dD}
  2605. \${ac_uA}HAVE_FPRINTF_DEC\${ac_uB}HAVE_FPRINTF_DEC\${ac_uC}1\${ac_uD}
  2606. \${ac_eA}HAVE_FPRINTF_DEC\${ac_eB}HAVE_FPRINTF_DEC\${ac_eC}1\${ac_eD}
  2607. "
  2608. }
  2609.  
  2610.  
  2611. fi
  2612. rm -f conftest*
  2613.  
  2614. test -n "$silent" || echo "checking for sprintf dec"
  2615. cat > conftest.${ac_ext} <<EOF
  2616. #include "confdefs.h"
  2617. #include <stdio.h>
  2618. int main() { return 0; }
  2619. int t() { int (*x)()=(int(*)())sprintf;; return 0; }
  2620. EOF
  2621. if eval $ac_compile; then
  2622.   rm -rf conftest*
  2623.   
  2624. {
  2625. test -n "$verbose" && \
  2626. echo "    defining HAVE_SPRINTF_DEC"
  2627. echo "#define" HAVE_SPRINTF_DEC "1" >> confdefs.h
  2628. DEFS="$DEFS -DHAVE_SPRINTF_DEC=1"
  2629. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SPRINTF_DEC\${ac_dB}HAVE_SPRINTF_DEC\${ac_dC}1\${ac_dD}
  2630. \${ac_uA}HAVE_SPRINTF_DEC\${ac_uB}HAVE_SPRINTF_DEC\${ac_uC}1\${ac_uD}
  2631. \${ac_eA}HAVE_SPRINTF_DEC\${ac_eB}HAVE_SPRINTF_DEC\${ac_eC}1\${ac_eD}
  2632. "
  2633. }
  2634.  
  2635.  
  2636. fi
  2637. rm -f conftest*
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657. # The preferred way to propogate these variables is regular @ substitutions.
  2658. if test -n "$prefix"; then
  2659.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2660. else
  2661.   prefix=/usr/local
  2662. fi
  2663. if test -n "$exec_prefix"; then
  2664.   ac_prsub="$ac_prsub
  2665. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2666. else
  2667.   exec_prefix='${prefix}' # Let make expand it.
  2668. fi
  2669.  
  2670. # Any assignment to VPATH causes Sun make to only execute
  2671. # the first set of double-colon rules, so remove it if not needed.
  2672. # If there is a colon in the path, we need to keep it.
  2673. if test "x$srcdir" = x.; then
  2674.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2675. fi
  2676.  
  2677. # Quote sed substitution magic chars in DEFS.
  2678. cat >conftest.def <<EOF
  2679. $DEFS
  2680. EOF
  2681. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2682. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2683. rm -f conftest.def
  2684. # Substitute for predefined variables.
  2685.  
  2686. trap 'rm -f config.status; exit 1' 1 2 15
  2687. echo creating config.status
  2688. rm -f config.status
  2689. cat > config.status <<EOF
  2690. #!/bin/sh
  2691. # Generated automatically by configure.
  2692. # Run this file to recreate the current configuration.
  2693. # This directory was configured as follows,
  2694. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2695. #
  2696. # $0 $configure_args
  2697.  
  2698. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2699. for ac_option
  2700. do
  2701.   case "\$ac_option" in
  2702.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2703.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2704.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2705.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2706.     echo "config.status generated by autoconf version 1.11"
  2707.     exit 0 ;;
  2708.   -help | --help | --hel | --he | --h)
  2709.     echo "\$ac_cs_usage"; exit 0 ;;
  2710.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2711.   esac
  2712. done
  2713.  
  2714. trap 'rm -fr Makefile config.h conftest*; exit 1' 1 2 15
  2715. YACC='$YACC'
  2716. FLEX='$FLEX'
  2717. AWK='$AWK'
  2718. INSTALL='$INSTALL'
  2719. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  2720. INSTALL_DATA='$INSTALL_DATA'
  2721. F2C='$F2C'
  2722. CC='$CC'
  2723. CPP='$CPP'
  2724. PAGER='$PAGER'
  2725. PLOT_PROG='$PLOT_PROG'
  2726. ALLOCA='$ALLOCA'
  2727. LLIBS='$LLIBS'
  2728. NALIBS='$NALIBS'
  2729. FLIBS='$FLIBS'
  2730. CMDLIBS='$CMDLIBS'
  2731. PLIBS='$PLIBS'
  2732. PLIB_INC_DIR='$PLIB_INC_DIR'
  2733. LIBS='$LIBS'
  2734. srcdir='$srcdir'
  2735. top_srcdir='$top_srcdir'
  2736. prefix='$prefix'
  2737. exec_prefix='$exec_prefix'
  2738. ac_prsub='$ac_prsub'
  2739. ac_vpsub='$ac_vpsub'
  2740. extrasub='$extrasub'
  2741. EOF
  2742. cat >> config.status <<\EOF
  2743.  
  2744. ac_given_srcdir=$srcdir
  2745.  
  2746. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  2747. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2748.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2749.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2750.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2751.     # The file is in a subdirectory.
  2752.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2753.     ac_dir_suffix="/$ac_dir"
  2754.   else
  2755.     ac_dir_suffix=
  2756.   fi
  2757.  
  2758.   # A "../" for each directory in $ac_dir_suffix.
  2759.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2760.   case "$ac_given_srcdir" in
  2761.   .)  srcdir=.
  2762.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  2763.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2764.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2765.   *) # Relative path.
  2766.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2767.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2768.   esac
  2769.  
  2770.   echo creating "$ac_file"
  2771.   rm -f "$ac_file"
  2772.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2773.   case "$ac_file" in
  2774.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  2775.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2776.   esac
  2777.   sed -e "
  2778. $ac_prsub
  2779. $ac_vpsub
  2780. $extrasub
  2781. s%@YACC@%$YACC%g
  2782. s%@FLEX@%$FLEX%g
  2783. s%@AWK@%$AWK%g
  2784. s%@INSTALL@%$INSTALL%g
  2785. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2786. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2787. s%@F2C@%$F2C%g
  2788. s%@CC@%$CC%g
  2789. s%@CPP@%$CPP%g
  2790. s%@PAGER@%$PAGER%g
  2791. s%@PLOT_PROG@%$PLOT_PROG%g
  2792. s%@ALLOCA@%$ALLOCA%g
  2793. s%@LLIBS@%$LLIBS%g
  2794. s%@NALIBS@%$NALIBS%g
  2795. s%@FLIBS@%$FLIBS%g
  2796. s%@CMDLIBS@%$CMDLIBS%g
  2797. s%@PLIBS@%$PLIBS%g
  2798. s%@PLIB_INC_DIR@%$PLIB_INC_DIR%g
  2799. s%@LIBS@%$LIBS%g
  2800. s%@srcdir@%$srcdir%g
  2801. s%@top_srcdir@%$top_srcdir%g
  2802. s%@prefix@%$prefix%g
  2803. s%@exec_prefix@%$exec_prefix%g
  2804. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2805. fi; done
  2806.  
  2807. # These sed commands are put into ac_sed_defs when defining a macro.
  2808. # They are broken into pieces to make the sed script easier to manage.
  2809. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2810. # is the cpp macro being defined and VALUE is the value it is being given.
  2811. # Each defining turns into a single global substitution command.
  2812. # Hopefully no one uses "!" as a variable value.
  2813. # Other candidates for the sed separators, like , and @, do get used.
  2814. #
  2815. # ac_d sets the value in "#define NAME VALUE" lines.
  2816. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2817. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2818. ac_dC='\3'
  2819. ac_dD='!g'
  2820. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2821. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2822. ac_uB='\([     ]\)!\1#\2define\3'
  2823. ac_uC=' '
  2824. ac_uD='\4!g'
  2825. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2826. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2827. ac_eB='$!\1#\2define\3'
  2828. ac_eC=' '
  2829. ac_eD='!g'
  2830. rm -f conftest.sed
  2831. EOF
  2832. # Turn off quoting long enough to insert the sed commands.
  2833. rm -f conftest.sh
  2834. cat > conftest.sh <<EOF
  2835. $ac_sed_defs
  2836. EOF
  2837.  
  2838. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2839. # on the size of here documents.
  2840.  
  2841. # Maximum number of lines to put in a single here document.
  2842. ac_max_sh_lines=9
  2843.  
  2844. while :
  2845. do
  2846.   # wc gives bogus results for an empty file on some AIX systems.
  2847.   ac_lines=`grep -c . conftest.sh`
  2848.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2849.   rm -f conftest.s1 conftest.s2
  2850.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  2851.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  2852.   # Write a limited-size here document to append to conftest.sed.
  2853.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2854.   cat conftest.s1 >> config.status
  2855.   echo 'CONFEOF' >> config.status
  2856.   rm -f conftest.s1 conftest.sh
  2857.   mv conftest.s2 conftest.sh
  2858. done
  2859. rm -f conftest.sh
  2860.  
  2861. # Now back to your regularly scheduled config.status.
  2862. cat >> config.status <<\EOF
  2863. # This sed command replaces #undef's with comments.  This is necessary, for
  2864. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2865. # on some systems where configure will not decide to define it in
  2866. # config.h.
  2867. cat >> conftest.sed <<\CONFEOF
  2868. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2869. CONFEOF
  2870. rm -f conftest.h
  2871. # Break up the sed commands because old seds have small limits.
  2872. ac_max_sed_lines=20
  2873.  
  2874. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2875. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2876.   echo creating $ac_file
  2877.  
  2878.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2879.   cp conftest.sed conftest.stm
  2880.   while :
  2881.   do
  2882.     ac_lines=`grep -c . conftest.stm`
  2883.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2884.     rm -f conftest.s1 conftest.s2 conftest.h2
  2885.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  2886.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  2887.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  2888.     rm -f conftest.s1 conftest.h1 conftest.stm
  2889.     mv conftest.h2 conftest.h1
  2890.     mv conftest.s2 conftest.stm
  2891.   done
  2892.   rm -f conftest.stm conftest.h
  2893.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2894.   cat conftest.h1 >> conftest.h
  2895.   rm -f conftest.h1
  2896.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2897.     # The file exists and we would not be changing it.
  2898.     echo "$ac_file is unchanged"
  2899.     rm -f conftest.h
  2900.   else
  2901.     rm -f $ac_file
  2902.     mv conftest.h $ac_file
  2903.   fi
  2904. fi; done
  2905. rm -f conftest.sed
  2906.  
  2907.  
  2908.  
  2909. exit 0
  2910. EOF
  2911. chmod +x config.status
  2912. # Some shells look in PATH for config.status without the "./".
  2913. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  2914.  
  2915.